#!/bin/bash

A=`cat log`

a=`gawk '{print $1}' log`
b=`gawk '{print $2}' log`
c=`gawk '{print $3}' log`

for i in $a
do
    echo -n ${i},
done

echo


for i in $b
do
    echo -n ${i},
done

echo

for i in $c
do
    echo -n ${i},
done

echo
